Skip to content

Comments

Strip target suffix for cargo-zigbuild compatibility#534

Open
bet4it wants to merge 1 commit intoPyO3:mainfrom
bet4it:zigbuild
Open

Strip target suffix for cargo-zigbuild compatibility#534
bet4it wants to merge 1 commit intoPyO3:mainfrom
bet4it:zigbuild

Conversation

@bet4it
Copy link

@bet4it bet4it commented May 18, 2025

When using cargo-zigbuild, target triples may include additional suffixes like glibc versions (e.g. aarch64-unknown-linux-gnu.2.17). This change strips any suffix after the dot to ensure compatibility with rustc, which only accepts standard target triples.

@davidhewitt
Copy link
Member

@messense does this seem correct to you? Seems to me like cargo-zigbuild might be passing the wrong information down rather than applying a patch here? 🤔

@messense
Copy link
Member

Sorry for the late reply, it looks good to me, when using cargo-zigbuild with setuptools-rust we set CARGO=cargo-zigbuild, if user set CARGO_BUILD_TARGET to aarch64-unknown-linux-gnu.2.17 the target triple in setuptools_rust would include the glibc version suffix, it's not something cargo-zigbuild passes to setuptools-rust.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants